package list.arry;

public class Main {
    public static void main(String[] args) {
        //创建空数组
        int arr[] = new int[20];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = i;
        }
        // 创建有初始值的数组
        int[] scores = new int[]{100, 99, 66};
        for (int i = 0; i < scores.length; i++) {
            System.out.println(scores[i]);
        }
        //修改指定索引的数组
        scores[1] = 98;
        for (int score :scores) {
            System.out.println(score);
        }
    }
}
